home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #1 / Ham Radio 2000.iso / ham2000 / packet / terminal / kam510 / kam-clst.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1989-11-30  |  819 b   |  42 lines

  1. type country = string[36];
  2.      cptr = ^country;
  3.  
  4. var countries : array[1..500] of cptr;
  5.     i,CountryNbr : integer;
  6.     CountryFile  : text;
  7.  
  8. {$F+}
  9. FUNCTION CountryPicker(var n: integer): string;
  10. begin
  11.   CountryPicker := countries[n]^;
  12. end;
  13. {$F-}
  14.  
  15. procedure NewCountry;
  16. var tmpptr : cptr;
  17. begin
  18.   inc(CountryNbr);
  19.   New(tmpptr);
  20.   countries[CountryNbr] := tmpptr;
  21. end;
  22.  
  23. procedure InitCountries;
  24. begin
  25.   CountryNbr := 0;
  26.   assign(CountryFile,'country.lst');
  27.   reset(CountryFile);
  28.   while NOT Eof(CountryFile) do
  29.   begin
  30.     NewCountry;
  31.     readln(CountryFile,countries[CountryNbr]^);
  32.   end;
  33.   close(CountryFile);
  34. end;
  35.  
  36. procedure CountryList;
  37. var i: integer;
  38. begin
  39.   Set_PickWindow_To(21,2,58,22,2,'List of Countries');
  40.   i := PickList ( @CountryPicker, 1, CountryNbr, 1);
  41. end;
  42.